var mysql = require('mysql');
var conn = mysql.createConnection({
	host:'localhost',
	user:'root',
	password:'123456',
	database:'message',
	port:'3306'
});
conn.connect();
conn.query('select * from p',function(err,rows,fields){
	if (err) throw err;
	console.log(rows[1].lastname);
});
conn.end();